package com.tebiecloud.order.client.service;

import com.tebiecloud.common.model.ResultBody;
import com.tebiecloud.order.client.model.entity.OrderEvaluate;
import com.tebiecloud.order.client.model.entity.Orderr;
import com.tebiecloud.order.client.model.vo.IncomeList;
import com.tebiecloud.order.client.model.vo.NotArrivedList;
import com.tebiecloud.order.client.model.vo.OrderRetailList;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

public interface IOrderServiceClient {

    /**
     * 获取未到余额
     * 如果有已退款的，需要在一周内显示，一周后不显示
     * @param userId
     * @return
     */
    @PostMapping("/feign/order/notArrivedList")
    ResultBody<List<NotArrivedList>> selectNotArrivedList(@RequestParam("userId") Long userId);

    /**
     * 获取收益列表
     * 传month查询月的收益
     * 传day查询天的收益
     * @param userId //用户id
     * @param month YYYY-MM
     * @param day YYYY-MM-dd
     * @return
     */
    @PostMapping("/feign/order/incomeList")
    ResultBody<IncomeList> selectIncomeList(
            @RequestParam(value = "userId") Long userId,
            @RequestParam(value = "month",required = false) String month,
            @RequestParam(value = "day",required = false) String day);

    /**
     * 获取订单信息
     * @param orderId
     * @return
     */
    @PostMapping("/feign/order/selectOrder")
    ResultBody<Orderr> selectOrder(@RequestParam("orderId") long orderId);

    /**
     * 获取订单信息
     * @param orderId
     * @return
     */
    @PostMapping("/feign/order/selectOrderVo")
    ResultBody<OrderRetailList> selectOrderVo(@RequestParam("orderId") long orderId);


    /**
     * 查询门店未核销订单
     * @param storeId
     * @return
     */
    @PostMapping("/feign/order/selectOrderList")
    ResultBody<List<Orderr>> selectOrderList(@RequestParam("storeId") long storeId);

    /**
     * 获取过期未支付订单
     * @return
     */
    @PostMapping("/feign/order/selectNotPayOrderList")
    ResultBody<List<Orderr>> selectNotPayOrderList(@RequestParam("status") int status,@RequestParam("ct") String ct);

    /**
     * 更新订单信息
     * @param orderId
     * @param status
     * @return
     */
    @PostMapping("/feign/order/updateOrder")
    ResultBody updateOrder(@RequestParam("orderId") long orderId,@RequestParam("status") int status);


    /**
     * 查询评价
     * @param orderId
     * @return
     */
    @PostMapping("/feign/order/selectOrderEvaluate")
    ResultBody<OrderEvaluate> selectOrderEvaluate(@RequestParam("orderId") long orderId);

}
